function main(require, module, exports) {
    const { foo } = require("./foo.js")
    console.log(foo)
    console.log('main')
}
function foo(require, module, exports) {
    const foo = 'foo'
    module.exports = {
        foo
    }
}
const map = {
    './foo.js': foo,
    './main.js': main
};
(function (map) {
    function require(path) {
        const fn = map[path]
        const module = {
            exports: {
            }
        }
        fn(require, module, module.exports)
        return module.exports
    }
    require('./main.js')
}(map))